package com.wc.alorithm_blue_bridge._数学知识.约数.秃头风险;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/**
 * @Author congge
 * @Date 2024/12/31 19:16
 * @description
 * https://www.lanqiao.cn/problems/20099/learning/?contest_id=231
 */
public class Main {
    /**
     * 思路：
     * 一个数是 X, 其约数个数为 X = p1^a1 * p2^a2 ... * pk^ak, res = (1 + a1) (1 + a2) ... (1 + ak)
     * X^X^X, 那就是 X 是偶数，a * b, 有一个是偶数, 结果就是偶数, 所以说, res = 奇数, 全部的数都要为奇数, 那么 a1 ~ ak都必须是偶数
     * 推导出,
     * X是偶数一定满足, a1 * X 一定是偶数
     * X是奇数的话, 他必须是完全平方数才满足条件, a1 * X 是偶数, a1 一定是偶数, 那就说明 X 必须是完全平方数才能满足
     * ok
     * 找吧
     * 特殊情况是 1 满足条件
     */
    static FastReader sc = new FastReader();
    static PrintWriter out = new PrintWriter(System.out);
    static int N = 100010;
    static int[] a = new int[N];
    static int n;

    public static void main(String[] args) {
        n = sc.nextInt();
        for (int i = 1; i <= n; i++) a[i] = sc.nextInt();
        int res = 0;
        for (int i = 1; i <= n; i++) {
            int x = a[i];
            if ((x & 1) == 0) res++;
            else {
                int sq = (int)Math.sqrt(x);
                if (sq * sq == x) res++;
            }
        }
        out.println(res);
        out.flush();
    }
}

class FastReader {
    StringTokenizer st;
    BufferedReader br;

    FastReader() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    String nextLine() {
        String s = "";
        try {
            s = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return s;
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    // 是否由下一个
    boolean hasNext() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                String line = br.readLine();
                if (line == null)
                    return false;
                st = new StringTokenizer(line);
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return true;
    }
}

